# Iron python code
# Generate Code for Control.Event
import System
from System import *
import Clip
from System.Text import *

Console.Write("Name = ")
name = Console.ReadLine()
Console.Write("EvtID = ")
evtId = Console.ReadLine()
Console.Write("EventType = ")
evtType = Console.ReadLine()
str = StringBuilder()
str.AppendLine("public event " + evtType + " " + name + "{ add { _EvtAdd(" + name + "EvtID, value); } remove { _EvtRemove(" + name + "EvtID, value); } }")
str.AppendLine("private const int "+name+"EvtID = "+evtId+";")
str.AppendLine("protected internal virtual void On"+name+"()")
str.AppendLine("{")
str.AppendLine("_EvtInvoke("+name+"EvtID);")
str.AppendLine("}")
Clip.SetText(str.ToString());
